﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Company.Hardware.Camera
{
    /// <summary>
    /// 相机接口
    /// </summary>
    public interface ICamera
    {
        /// <summary>
        /// 相机拍照回调事件
        /// </summary>
        event Action<CameraImage> OnTrigger;

        /// <summary>
        /// 是否初始化
        /// </summary>
        bool Initialized { get; }

        /// <summary>
        /// 初始化
        /// </summary>
        /// <returns></returns>
        bool Initialize(ICameraConfigProvider provider);

        /// <summary>
        /// 拍照
        /// </summary>
        /// <returns></returns>
        bool Trigger();

        /// <summary>
        /// 关闭相机
        /// </summary>
        /// <returns></returns>
        bool Close();
    }
}
